package com.zygh.policeasset.scheduled;

import cn.hutool.core.io.FileUtil;
import java.io.File;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/scheduled/FileDeleteSchedule.class */
public class FileDeleteSchedule {
    private static String exportUrl;

    @Value("${file.export}")
    public void setExportUrl(String exportUrl2) {
        exportUrl = exportUrl2;
    }

    @Scheduled(cron = "0 54 23 * * ?")
    public void scheduleding() {
        System.out.println("执行定时任务");
        File folder = new File(exportUrl);
        if (folder.exists() || folder.isDirectory()) {
            FileUtil.del(exportUrl);
        } else {
            System.out.println("文件不存在");
        }
    }
}